Optimal. Leaf size=45 \[ \frac {A x}{2 a c}-\frac {\cos ^2(e+f x) (B-A \tan (e+f x))}{2 a c f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.13, antiderivative size = 45, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 41, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.098, Rules used = {3588, 73, 639, 205} \[ \frac {A x}{2 a c}-\frac {\cos ^2(e+f x) (B-A \tan (e+f x))}{2 a c f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 73
Rule 205
Rule 639
Rule 3588
Rubi steps
\begin {align*} \int \frac {A+B \tan (e+f x)}{(a+i a \tan (e+f x)) (c-i c \tan (e+f x))} \, dx &=\frac {(a c) \operatorname {Subst}\left (\int \frac {A+B x}{(a+i a x)^2 (c-i c x)^2} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {(a c) \operatorname {Subst}\left (\int \frac {A+B x}{\left (a c+a c x^2\right )^2} \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac {\cos ^2(e+f x) (B-A \tan (e+f x))}{2 a c f}+\frac {A \operatorname {Subst}\left (\int \frac {1}{a c+a c x^2} \, dx,x,\tan (e+f x)\right )}{2 f}\\ &=\frac {A x}{2 a c}-\frac {\cos ^2(e+f x) (B-A \tan (e+f x))}{2 a c f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.08, size = 43, normalized size = 0.96 \[ \frac {A (2 (e+f x)+\sin (2 (e+f x)))-2 B \cos ^2(e+f x)}{4 a c f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [C] time = 2.13, size = 58, normalized size = 1.29 \[ \frac {{\left (4 \, A f x e^{\left (2 i \, f x + 2 i \, e\right )} + {\left (-i \, A - B\right )} e^{\left (4 i \, f x + 4 i \, e\right )} + i \, A - B\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{8 \, a c f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 1.03, size = 53, normalized size = 1.18 \[ \frac {\frac {{\left (f x + e\right )} A}{a c} + \frac {A \tan \left (f x + e\right ) - B}{{\left (\tan \left (f x + e\right )^{2} + 1\right )} a c}}{2 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.31, size = 142, normalized size = 3.16 \[ \frac {i A \ln \left (\tan \left (f x +e \right )+i\right )}{4 f c a}+\frac {A}{4 f c a \left (\tan \left (f x +e \right )+i\right )}-\frac {i B}{4 f c a \left (\tan \left (f x +e \right )+i\right )}-\frac {i A \ln \left (\tan \left (f x +e \right )-i\right )}{4 f c a}+\frac {A}{4 f c a \left (\tan \left (f x +e \right )-i\right )}+\frac {i B}{4 f c a \left (\tan \left (f x +e \right )-i\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: RuntimeError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 8.45, size = 40, normalized size = 0.89 \[ \frac {\frac {A\,\sin \left (2\,e+2\,f\,x\right )}{2}-\frac {B\,\cos \left (2\,e+2\,f\,x\right )}{2}+A\,f\,x}{2\,a\,c\,f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.37, size = 167, normalized size = 3.71 \[ \frac {A x}{2 a c} + \begin {cases} \frac {\left (\left (8 i A a c f - 8 B a c f\right ) e^{- 2 i f x} + \left (- 8 i A a c f e^{4 i e} - 8 B a c f e^{4 i e}\right ) e^{2 i f x}\right ) e^{- 2 i e}}{64 a^{2} c^{2} f^{2}} & \text {for}\: 64 a^{2} c^{2} f^{2} e^{2 i e} \neq 0 \\x \left (- \frac {A}{2 a c} + \frac {\left (A e^{4 i e} + 2 A e^{2 i e} + A - i B e^{4 i e} + i B\right ) e^{- 2 i e}}{4 a c}\right ) & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________